package com.tenton.netty.pool;

import com.google.common.util.concurrent.ThreadFactoryBuilder;

import java.util.concurrent.*;

/**
 * @ClassName: ThreadPool
 * @Description:  线程池
 * @Author： tangdong
 * @Date： 2024/6/25
 */

public class ThreadPool {

    /**
     * 数据处理线程池
     */
    private static ThreadFactory dataDealNamedThreadFactory = new ThreadFactoryBuilder().setNameFormat("dataAccess-pool-%d").build();
    public static ExecutorService dataDealThreadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
            60L, TimeUnit.MILLISECONDS, new SynchronousQueue<>(),
            dataDealNamedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
}
